-
Notifications
You must be signed in to change notification settings - Fork 71
56 lines (53 loc) · 1.92 KB
/
Copy pathnetlify-deploy.yaml
File metadata and controls
56 lines (53 loc) · 1.92 KB
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
name: Netlify Deploy
on:
workflow_dispatch:
# Released together with the packages: the tag pushed by bump-version triggers
# this workflow and build-release.yaml at the same time, so docs and packages
# build in parallel.
push:
tags:
- v*.*.*
# One production deploy at a time, whatever triggered it -- the deploy target is a single
# shared resource, so overlapping runs race to decide what is live. Never cancels: a
# cancelled `netlify deploy --prod` can leave the site partly updated.
concurrency:
group: netlify-prod
cancel-in-progress: false
jobs:
tag-checks:
name: Check the triggering tag
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
is_on_master: ${{ steps.check.outputs.is_on_master }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0 # the checks need every tag and the default branch
- id: check
uses: ./.github/actions/release-tag-checks
netlify-deploy:
# Only tags that are on master publish documentation: the hugo action checks out the
# triggering tag, so deploying from a patch tag would put an outdated site live.
# See .github/actions/release-tag-checks for why this is not the is_latest check.
needs: tag-checks
if: needs.tag-checks.outputs.is_on_master == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive
- name: Hugo Build
uses: gooddata/gooddata-python-sdk/.github/actions/hugo-build-versioned-action@master
with:
base-url: https://www.gooddata.ai/docs/python-sdk
- name: Publish
uses: netlify/actions/cli@master
with:
args: deploy -d docs/public --prod
env:
NETLIFY_SITE_ID: 93e23db0-d31a-4a12-801a-b9479ffef486 # Not a secret
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}