From d446c1881c16d679551b0c939fe239fd6841e006 Mon Sep 17 00:00:00 2001 From: edotau Date: Wed, 17 Jan 2024 18:15:01 -0800 Subject: [PATCH] cicd --- .github/workflows/jekyll-gh-pages.yaml | 45 ++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/jekyll-gh-pages.yaml diff --git a/.github/workflows/jekyll-gh-pages.yaml b/.github/workflows/jekyll-gh-pages.yaml new file mode 100644 index 000000000..640c3211f --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yaml @@ -0,0 +1,45 @@ +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll with GitHub Pages dependencies preinstalled +on: + # Runs on pushes targeting the default branch + push: + branches: ["gh-pages"] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false +jobs: +needs: ".github/workflows/gh-deploy.yaml" + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./ + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/package.json b/package.json index 949603fcf..11a1efbb7 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "build": "babel src -d dist", "clean": "rm -rf dist", "dist": "yarn run clean && yarn run build", - "deploy": "gh-pages -d ./" + "deploy": "gh-pages -d docs" }, "devDependencies": { "@babel/cli": "^7.4.4",