Sas48 event #42
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: Trusted Preview Deployment | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
statuses: write | |
pull-requests: write | |
jobs: | |
build-and-deploy: | |
name: Build | |
runs-on: ubuntu-latest | |
# Only run this workflow if PR is not from a fork | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Set up Nix | |
uses: cachix/install-nix-action@v20 | |
- name: Set up nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@v1 | |
- name: Build | |
run: | | |
nix build | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: "./result/public" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: ${{ github.event.pull_request.title }} | |
alias: deploy-preview-${{ github.event.number }} | |
enable-commit-comment: false | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |