Skip to content

Commit 1099689

Browse files
Merge pull request #16 from Availity/refactor/native-deploy-actions
build: migrate to the native deploy actions
2 parents ff743c9 + 98e078b commit 1099689

1 file changed

Lines changed: 18 additions & 22 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,28 @@ on:
1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
1317

1418
steps:
1519
- name: Checkout Code
16-
uses: actions/checkout@v3
20+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
1721
with:
1822
ref: source
19-
token: ${{ secrets.BOT_TOKEN }}
2023

2124
- name: Set Node Version
22-
uses: actions/setup-node@v2
25+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2326
with:
24-
node-version: 18
27+
node-version: 22
2528

2629
- name: Get yarn cache directory path
2730
id: yarn-cache-dir-path
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
31+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
2932

3033
- name: Setup Cache
31-
uses: actions/cache@v3
34+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3235
id: yarn-cache
3336
with:
3437
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -39,23 +42,16 @@ jobs:
3942
- name: Install Dependencies
4043
run: yarn install --immutable
4144

42-
- name: Set registry and auth
43-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
44-
45-
- name: Set git config
46-
run: |
47-
git config --global user.email ${{ secrets.GH_EMAIL }}
48-
git config --global user.name ${{ secrets.GH_USER }}
49-
5045
- name: Build
5146
run: yarn build
5247

53-
- name: Deploy
54-
uses: crazy-max/ghaction-github-pages@v3
48+
- name: Setup Pages
49+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
50+
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
5553
with:
56-
target_branch: master
57-
build_dir: build
58-
commit_message: deployed docs
59-
committer: ${{ secrets.GH_USER }} ${{ secrets.GH_EMAIL }}
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
54+
path: build
55+
56+
- name: Deploy to GitHub Pages
57+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

0 commit comments

Comments
 (0)