v9.6.0 #65
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: On release | |
on: | |
release: | |
types: [published] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
set-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- run: git tag -f production | |
- run: git push -f origin production | |
# TODO: invoke auto-build.yml instead | |
deploy: | |
name: Netlify deploy | |
runs-on: ubuntu-latest | |
# timeout-minutes: 50 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: production | |
- uses: ./.github/workflows/setup-workspace | |
# Step to generate the current date and time | |
- name: Set deployment date | |
id: set-deploy-date | |
run: echo "DEPLOY_DATE=$(date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV | |
- run: pnpm 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_ALIAS: ${{ secrets.ES_ALIAS_PROD }} | |
ES_INDEX_PREFIX: ${{ secrets.ES_INDEX_PREFIX_PROD }} | |
ES_TEMP_INDEX_PREFIX_LIBGUIDES: ${{secrets.ES_TEMP_INDEX_PREFIX_LIBGUIDES_PROD}} | |
LIBGUIDES_ES_INDEX: ${{secrets.LIBGUIDES_ES_INDEX_PROD}} | |
- name: Deploy to Netlify on release | |
uses: nwtgck/actions-netlify@v3 | |
with: | |
production-deploy: true | |
deploy-message: "Deployment triggered by release ${{ github.event.release.tag_name }}. Date ${{ env.DEPLOY_DATE }}" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
publish-dir: .output/public | |
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 }} | |