-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (57 loc) · 1.82 KB
/
push--deploy-github-pages.yaml
File metadata and controls
63 lines (57 loc) · 1.82 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
53
54
55
56
57
58
59
60
61
62
63
name: Deploy to GitHub Pages
# Updates the GitHub pages website with the changes made in the last push.
# builds the newest version of the website using astro.
on:
schedule: [cron: '0 0 1 1 *'] # updates the copyright at the footer
workflow_dispatch:
push:
branches: [main, master, release, development]
paths:
- ".github/workflows/push--deploy-github-pages.yaml"
- "redirects.yml"
- "src/**"
- "package*"
- tailwind.config.*
- astro.config.*
- tsconfig.*
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: false
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
# Fails randomly and unexpectedly, cannot reproduce.
# - name: Check the links
# uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
# with: { fail: true, args: redirects.yaml --no-progress --verbose }
- name: Setup Pages
uses: actions/configure-pages@v5.0.0
- name: Set up Node.js
uses: actions/setup-node@v6.1.0
with: { node-version: 24 }
- name: Install all dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with: { path: ./dist }
deploy:
name: Deploy site
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0