Skip to content

Commit 9ddea34

Browse files
committed
CI: Use actions/deploy-pages to deploy to GitHub Pages
1 parent 6bd138c commit 9ddea34

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ on:
66
pull_request:
77

88
jobs:
9-
ci:
10-
name: CI
9+
build:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v2
@@ -43,9 +42,25 @@ jobs:
4342
- run: cargo run
4443
- run: cp CNAME ./site/
4544
- run: touch site/.nojekyll
46-
- uses: JamesIves/github-pages-deploy-action@releases/v3
47-
if: github.ref == 'refs/heads/master'
45+
46+
- uses: actions/upload-pages-artifact@v1.0.9
4847
with:
49-
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
BRANCH: gh-pages
51-
FOLDER: site
48+
path: site
49+
50+
deploy:
51+
if: ${{ github.ref == 'refs/heads/master' }}
52+
53+
needs: build
54+
55+
permissions:
56+
pages: write
57+
id-token: write
58+
59+
runs-on: ubuntu-latest
60+
steps:
61+
- id: deployment
62+
uses: actions/deploy-pages@v2.0.2
63+
64+
environment:
65+
name: github-pages
66+
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)