Skip to content

Commit 7f12b8e

Browse files
committed
Update GitHub Actions workflow to deploy to gh-pages branch; adjust permissions and simplify deployment steps
1 parent ea0496d commit 7f12b8e

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

.github/workflows/website-deploy.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Website
22

33
on:
44
push:
5-
branches: [website]
5+
branches: [gh-pages]
66
# Allows you to run this workflow manually from the Actions tab
77
workflow_dispatch:
88

@@ -26,13 +26,11 @@ jobs:
2626
gh-release:
2727
if: github.event_name != 'pull_request'
2828
runs-on: ubuntu-latest
29+
# We need write permissions for contents to push to gh-pages branch
2930
permissions:
30-
contents: read
31-
pages: write
32-
id-token: write
33-
environment:
34-
name: github-pages
35-
url: ${{ steps.deployment.outputs.page_url }}
31+
contents: write
32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.ref }}
3634
steps:
3735
- name: Checkout
3836
uses: actions/checkout@v4
@@ -45,12 +43,9 @@ jobs:
4543
run: yarn install --frozen-lockfile
4644
- name: Build website
4745
run: yarn build
48-
- name: Setup Pages
49-
uses: actions/configure-pages@v4
50-
- name: Upload Pages artifact
51-
uses: actions/upload-pages-artifact@v3
52-
with:
53-
path: './build'
5446
- name: Deploy to GitHub Pages
55-
id: deployment
56-
uses: actions/deploy-pages@v4
47+
uses: JamesIves/github-pages-deploy-action@v4
48+
with:
49+
folder: build
50+
branch: gh-pages
51+
clean: true # Automatically remove deleted files from the deploy branch

0 commit comments

Comments
 (0)