-
Notifications
You must be signed in to change notification settings - Fork 306
56 lines (52 loc) · 1.62 KB
/
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
name: Build
on:
push:
branches: [master, develop, released, hotfix/*, release/*]
pull_request:
branches: [master, develop*, released]
merge_group:
types: [checks_requested]
permissions:
contents: read
pull-requests: write
deployments: write
packages: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
netlify:
runs-on: ubuntu-latest
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
steps:
- name: Get cache date
id: get-date
run: echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: 'pnpm'
- name: Authenticate NPM
uses: DimensionDev/github-token-action@latest
with:
registry: true
- run: git config --global url."https://github.com/".insteadOf [email protected]
- run: pnpm install
- run: npx gulp build-ci-netlify
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2
with:
publish-dir: './packages/netlify/'
production-branch: develop
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-commit-comment: false
enable-pull-request-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1