Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
semanticdata committed Feb 27, 2024
1 parent 4a853c5 commit 07fac1d
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 2 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<img src="https://img.shields.io/website/https/miguelpimentel.do.svg" />
</p>

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

Expand Down Expand Up @@ -108,7 +108,7 @@ pnpm run format

## Frontmatter

Check them out here: <https://frontmatter.codes>
Check them out here: [https://frontmatter.codes](https://frontmatter.codes)

### Example

Expand Down

0 comments on commit 07fac1d

Please sign in to comment.