Skip to content

Commit f9d080e

Browse files
committed
deploy book via official actions
1 parent 13b7a38 commit f9d080e

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,25 @@ jobs:
2424
run: |
2525
git config --global http.postBuffer 50000000
2626
git config --global https.postBuffer 50000000
27-
- uses: rust-lang/simpleinfra/github-actions/static-websites@master
27+
- name: Upload book artifacts
28+
uses: upload-pages-artifact@v3
2829
with:
29-
deploy_dir: book
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
path: book
3131
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'rust-lang'
32+
33+
# Deploy is run as a separate job as it needs elevated permissions
34+
deploy:
35+
name: deploy
36+
runs-on: ubuntu-latest
37+
needs: test # the `test` job uploads the pages artifact
38+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'rust-lang'
39+
permissions:
40+
pages: write
41+
id-token: write
42+
environment:
43+
name: github-pages
44+
url: ${{steps.deployment.outputs.page_url}}
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
uses: actions/deploy-pages@v4
48+
id: deployment

0 commit comments

Comments
 (0)