-
Notifications
You must be signed in to change notification settings - Fork 15
48 lines (41 loc) · 1.43 KB
/
dhis2-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
name: 'dhis2: deploy (netlify)'
# Requirements:
#
# - Org secrets:
# DHIS2_BOT_NETLIFY_TOKEN
# DHIS2_BOT_GITHUB_TOKEN
# - Repo secrets:
# NETLIFY_SITE_ID
# - Customize the 'jobs.build.steps.netlify-deploy.publish-dir' property
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: nwtgck/[email protected]
with:
production-branch: 'master'
production-deploy: true
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
deploy-message: 'Deploy documentation site from GitHub Actions'
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: false
publish-dir: 'dist'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.DHIS2_BOT_NETLIFY_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}