-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (40 loc) · 1.15 KB
/
deploy-prd.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
name: deploy website to production
on:
push:
tags:
- 'v*'
permissions:
pages: write # Grant Pages access
id-token: write # Necessary for the step that deploys to Github pages
jobs:
build:
runs-on: ubuntu-latest
name: deploying to guild-avatar.surge.sh
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g surge
- run: make build
- run: surge public guild-avatar.surge.sh --token ${{ secrets.SURGE_TOKEN }}
# Upload artifact to github pages
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
# Deploy github pages
deploy:
runs-on: ubuntu-latest
needs: build # This ensures the deploy step only runs after the build job succeeds
permissions:
pages: write
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2