Skip to content

add workflow to deploy and teardown PR version of website #6

add workflow to deploy and teardown PR version of website

add workflow to deploy and teardown PR version of website #6

Workflow file for this run

name: Deploy PR CI
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
jobs:
release:
name: Deploy website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.5'
bundler-cache: true
- name: Build static site
run: bundle exec jekyll build
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install surge
run: npm install -g surge
- name: Deploy
run: surge _site/ ${{ vars.SURGE_PREFIX }}-${{ GITHUB_HEAD_REF }}.${{ vars.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}

Check failure on line 30 in .github/workflows/deploy-pr.yml

View workflow run for this annotation

GitHub Actions / Deploy PR CI

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-pr.yml (Line: 30, Col: 14): Unrecognized named-value: 'GITHUB_HEAD_REF'. Located at position 1 within expression: GITHUB_HEAD_REF