Skip to content

Merge pull request #14 from paulipotter/bio #57

Merge pull request #14 from paulipotter/bio

Merge pull request #14 from paulipotter/bio #57

Workflow file for this run

name: ci-cd
on:
[pull_request, push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies πŸ› 
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
- name: Build Jekyll for GitHub Pages πŸ‘·πŸ»β€β™€οΈ
uses: actions/[email protected]
with:
source: ./
destination: ./_site
future: true
build_revision: ${{ github.sha }}
verbose: true
token: ${{ github.token }}
- name: Upload GitHub Pages artifact πŸ“¦
uses: actions/[email protected]
get-artifact:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Download Artifact πŸ‘Ύ
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
deploy:
# Use branch name for whatever purpose
needs: [get-artifact, build]
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Get branch name
run: echo 'The branch name is' $BRANCH_NAME
- name: Deploy GitHub Pages site 🌎
id: deployment
uses: actions/[email protected]