Skip to content

Commit

Permalink
💚 Fix CD
Browse files Browse the repository at this point in the history
  • Loading branch information
maremarismaria committed Aug 5, 2024
1 parent 4dba1c3 commit 6e1b10f
Showing 1 changed file with 42 additions and 27 deletions.
69 changes: 42 additions & 27 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
name: cd
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on: [push, pull_request]
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

jobs:
cd:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [18]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

steps:
- name: Checkout
uses: actions/checkout@master
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

- name: Setup node env
uses: actions/setup-node@v4

with:
node-version: ${{ matrix.node }}
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

- name: Install dependencies
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
container: node:18.14.0
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
- name: 📦 Install
run: npm i

- name: Generate
run: npm run generate

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: ✅ Test
run: npm run test:unit
- name: 🏗 Build
run: npm run build
- name: ⚙️ Setup Pages
uses: actions/configure-pages@v2
- name: ⬆️ Upload artifact
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
# Upload entire repository
path: './dist'
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 6e1b10f

Please sign in to comment.