Skip to content

content/add-sponsor-anduril #93

content/add-sponsor-anduril

content/add-sponsor-anduril #93

Workflow file for this run

name: Build and Preview
on:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
workflow_dispatch:
jobs:
build:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Set Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "America/Los_Angeles"
- name: Checkout 🛎️
uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: npm i
- name: Change config for PR preview build
run: |
sed -i '11 i "base": "/pr-preview/pr-${{ github.event.number }}",' astro.config.mjs
- name: Build
if: github.event.action != 'closed'
run: |
nix build
- name: Copy build result
run: |
cp -rv $(readlink -f result) out
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./out/
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: website
path: out/**