Bump mamba-org/setup-micromamba from 1 to 2 #125
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: NetlifyPreview | |
on: | |
pull_request_target: | |
types: [labeled, synchronize] | |
branches: | |
- main | |
jobs: | |
add-preview: | |
runs-on: ubuntu-latest | |
# This workflow accesses secrets and checks out a PR, so only run if labelled | |
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | |
if: contains(github.event.pull_request.labels.*.name, 'preview') | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: environment.yml | |
environment-name: splashpage | |
cache-environment: true | |
- name: Render website | |
run: | | |
./scripts/build_resources.sh | |
- name: Deploy Website Preview | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './_build/html' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-github-deployment: false | |
enable-commit-status: false | |
enable-commit-comment: false | |
enable-pull-request-comment: true | |
overwrites-pull-request-comment: true | |
alias: deploy-preview-${{ github.event.number }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |