Skip to content

actions/{upload,download}-artifact@v4 #1090

actions/{upload,download}-artifact@v4

actions/{upload,download}-artifact@v4 #1090

Workflow file for this run

on:
push:
branches: [main]
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
check-and-build:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix --accept-flake-config flake check
- run: nix --accept-flake-config build
- uses: actions/upload-artifact@v4
with:
path: ./result
if-no-files-found: error
deploy-preview:
if: github.event_name == 'pull_request'
needs: check-and-build
environment: pull_request_deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: actions/download-artifact@v4
with:
name: artifact
path: .vercel/output/static
- id: deploy
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: nix --accept-flake-config run .#deploy-preview
- uses: thollander/actions-comment-pull-request@v2
with:
message: |
Branch deployed for review at:
${{ steps.deploy.outputs.URL }}
deploy-production:
if: github.ref == 'refs/heads/main'
needs: check-and-build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: artifact