From 469fdb11af9b0c5b175787395c3e095d41a12dbc Mon Sep 17 00:00:00 2001 From: Pierre-Anthony Lemieux Date: Thu, 2 May 2024 20:49:16 -0700 Subject: [PATCH] Add CI --- .github/workflows/main.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..dba1f91 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,47 @@ +name: Pages + +on: + push: + branches: + - main # default branch + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + submodules: recursive + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Cache NPM dependencies + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.OS }}-npm-cache + restore-keys: | + ${{ runner.OS }}-npm-cache + - name: Install Dependencies + run: npm install + - name: Build + run: npm run build + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./public + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file