-
Notifications
You must be signed in to change notification settings - Fork 27
36 lines (34 loc) · 980 Bytes
/
CD.yml
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
name: CD
on:
push:
branches:
- master
jobs:
deploy_2024:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: 2023/package-lock.json
- run: mkdir dist
- run: cp public/* dist/
- run: mv 2019/public dist/2019
- run: mv 2021/public dist/2021
- run: mv 2022/public dist/2022
- run: mv 2023/public dist/2023
- run: cd 2024 && npm i && npm run build -- --prefix-paths --verbose && (mv public/2024 ../dist || mkdir ../dist/2024) && cp -r public/* ../dist/2024
- run: find dist
- uses: actions/upload-pages-artifact@v1
with:
path: dist
- uses: actions/deploy-pages@v1
id: deployment