-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (48 loc) · 2.23 KB
/
Copy pathdeploy-to-gh-pages.yml
File metadata and controls
52 lines (48 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This GitHub Actions workflow deploys the website file tree to GitHub Pages.
# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Deploy to GitHub Pages
on:
# Run this workflow whenever someone pushes commits or tags to the `main` branch.
#
# Reference:
# - https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push
# - https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-excluding-paths
#
push:
branches: [ main ]
paths-ignore: [ '.gitignore', 'README.md', 'development.md', 'docker-compose.yml' ]
# Allow this workflow to be run manually (e.g., via the "Actions" tab on GitHub).
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch: { }
# Reference: https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
# Use an existing workflow to assemble the website file tree that, in this workflow, we will deploy to GitHub Pages.
# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow
assemble-website:
name: Assemble website
uses: ./.github/workflows/assemble-website.yml
deploy:
name: Deploy website
needs:
- assemble-website
runs-on: ubuntu-latest
# Reference: https://github.com/actions/deploy-pages
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# Reference: https://github.com/actions/deploy-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
with:
# Note: The artifact name is "github-pages" by default; so, this specification is redundant. We include it
# anyway, here, as a reminder for people that will be implementing workflows that consume the same
# artifact; e.g., spell checkers and link checkers.
artifact_name: github-pages