-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (43 loc) · 1.6 KB
/
auto-build.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
name: Website Release
# Performs a Website release using Netlify when a new GitHub release has been published
on:
# push:
# tags:
# - production
schedule:
- cron: '00 8,20 * * *' # 8,20 UTC = noon and midnight PST, 1am and 1pm PDT
jobs:
nuxt-prod:
name: Netlify deploy
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
ref: production
- uses: ./.github/workflows/setup-workspace
- run: npm run generate
env:
CRAFT_ENDPOINT: ${{ secrets.CRAFT_PROD_ENDPOINT }}
LIBCAL_ENDPOINT: ${{ secrets.LIBCAL_ENDPOINT }}
S3_BUCKET: "https://static.library.ucla.edu/"
SITEMAP_HOST: ${{ secrets.SITEMAP_URL_PROD }}
ES_URL: ${{ secrets.ES_URL }}
ESApiKey: ${{ secrets.ESApiKey }}
ES_READ_KEY: ${{ secrets.ES_READ_KEY_PROD }}
ES_WRITE_KEY: ${{ secrets.ES_WRITE_KEY_PROD }}
ES_INDEX: ${{ secrets.ES_INDEX_PROD }}
ES_INDEX_PREFIX: ${{ secrets.ES_INDEX_PREFIX_PROD }}
LIBGUIDES_ES_INDEX: ${{secrets.LIBGUIDES_ES_INDEX_PROD}}
- name: Deploy to Netlify on release
uses: nwtgck/actions-netlify@v2 #
with:
production-deploy: true
deploy-message: https://github.com/UCLALibrary/library-website-nuxt/commit/${{ github.sha }}
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-dir: './dist'
fails-without-credentials: true
github-deployment-environment: production
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_PROD_LIBRARY_SITE_ID }}