-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (53 loc) · 1.79 KB
/
continuous-deployment.yaml
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
name: continuous-deployment
run-name: '[CD] Deployment of the website by @${{ github.actor }}'
on:
workflow_run:
branches: [main]
types: [completed]
workflows: [continuous-integration]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'deployment'
cancel-in-progress: true
jobs:
build-website:
name: '[CD] Project building'
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
-
name: '[GITHUB / OFFICIAL] Checkout'
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
-
name: '[INTERNAL] Install project & environment'
uses: ./.github/actions/install
with:
architecture: x64
node_version: 18
-
name: 'Launch build'
shell: sh
run: pnpm run build
-
name: '[GITHUB / OFFICIAL] Setup Pages'
uses: actions/configure-pages@c5a3e1159e0cbdf0845eb8811bd39e39fc3099c2 # v2.1.3
-
name: '[GITHUB / OFFICIAL] Upload artifact'
uses: actions/upload-pages-artifact@v1
with:
path: './'
deploy-website:
needs: build-website
name: '[CD] Project deployment'
runs-on: ubuntu-latest
environment:
name: website-production
url: ${{ steps.deployment.outputs.page_url }}
steps:
-
name: '[GITHUB / OFFICIAL] Deploy to GitHub Pages'
id: deployment
uses: actions/deploy-pages@20a4baa1095bad40ba7d6ca0d9abbc220b76603f # v1.2.3