-
Notifications
You must be signed in to change notification settings - Fork 8
36 lines (32 loc) · 1.27 KB
/
main.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
name: main
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
# (from: https://github.com/actions/checkout/tree/f95f2a38561736d1542cb9fbf736eea3d00ab5a6#checkout-submodules)
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- uses: actions/[email protected]
with:
node-version: 12.x
- run: npm ci
- run: npm run build
- name: Google Search Console
run: 'echo "google-site-verification: ${{ secrets.GOOGLE_SITE_VERIFICATION_CODE }}.html" > dist/${{ secrets.GOOGLE_SITE_VERIFICATION_CODE }}.html'
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './dist'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-pull-request-comment: false
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}