-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.42 KB
/
deploy-netlify.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy to Netlify
permissions:
contents: read
on:
workflow_call:
inputs:
environment:
type: string
required: true
outputs:
address:
value: ${{ jobs.netlify_production.outputs.address }}
secrets:
NETLIFY_TOKEN:
required: true
jobs:
netlify_production:
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: read
outputs:
address: ${{ steps.prod_deployment.outputs.address }}
environment:
name: ${{ inputs.environment }}
url: ${{ steps.prod_deployment.outputs.address}}
steps:
- uses: actions/download-artifact@v4
with:
pattern: site-build-*
merge-multiple: true
- run: |
for file in *.tar.gz; do tar -zxf "$file"; done
wget https://raw.githubusercontent.com/privacyguides/webserver/main/netlify/netlify.toml
wget -P site https://raw.githubusercontent.com/privacyguides/webserver/main/netlify/_redirects
ls -la site/
- uses: actions/setup-node@v4
- run: |
npm install netlify-cli -g
- id: prod_deployment
env:
NETLIFY_SITE_ID: ${{ vars.PROD_NETLIFY_SITE }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
run: |
netlify deploy --dir=site --prod-if-unlocked
echo "address=https://${{ vars.PROD_NETLIFY_SITE }}.netlify.app/" >> "$GITHUB_OUTPUT"