diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml new file mode 100644 index 0000000..7daf352 --- /dev/null +++ b/.github/workflows/deploy-test.yml @@ -0,0 +1,65 @@ +name: Deploy to GitHub Pages (test) + +on: + workflow_dispatch: + # push: + # branches: + # - main + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for git info + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: pnpm/action-setup@v3 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + - name: Build the site + run: pnpm run build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + deploy: + needs: build + 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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3885d85 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,44 @@ +name: Deploy to GitHub Pages (npm) + +on: + workflow_dispatch: + # push: + # branches: + # - main + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for git info + - uses: actions/setup-node@v3 + with: + node-version: 20.11.0 + - name: Install dependencies + run: npm i + - name: Build + run: npm run build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + deploy: + needs: build + 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 diff --git a/README.md b/README.md index 271d18e..152320d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

-My personal website built with [11ty](https://www.11ty.dev/). +My personal website built with [11ty](https://www.11ty.dev/) and elva. ## Changes from Upstream @@ -108,7 +108,7 @@ pnpm run format ## Frontmatter -Check them out here: +Check them out here: [https://frontmatter.codes](https://frontmatter.codes) ### Example