Skip to content

Commit

Permalink
ci: github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rayriffy committed Jan 20, 2023
1 parent 47492c1 commit d9bb8f2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy

on:
push:
branches: [ "main" ]
workflow_dispatch:

jobs:
runtime:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: 'Intitialize: Checkout repository'
uses: actions/checkout@v3
- name: 'Intitialize: Summon NodeJS'
uses: actions/setup-node@v3
with:
node-version: 18
- name: 'Intitialize: Configure pnpm'
uses: pnpm/[email protected]
id: pnpm-install
with:
version: 7
run_install: false
- name: 'Cache: node_modules'
uses: actions/cache@v3
with:
path: |
node_modules
~/.local/share/pnpm/store/v3
key: ${{ runner.OS }}-x86-node18-pnpm7-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-x86-node18-pnpm7-${{ env.cache-name }}-
${{ runner.OS }}-x86-node18-pnpm7-
- name: 'Intitialize: Install dependencies'
run: pnpm -r i --shamefully-hoist --prefer-offline
- name: 'Execute: Build'
run: pnpm build
- name: 'Deployment: Upload artifacts'
uses: actions/upload-pages-artifact@v1
with:
path: dist
- name: 'Deployment: Deploy to target'
id: deployment
uses: actions/deploy-pages@v1
- name: 'Post-deplotyment: Logging'
run: echo "Deployed at ${{ steps.deployment.outputs.page_url }}"
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///Users/rayriffy/Git/sushiro/.github/workflows/deploy.yml"
}
}

0 comments on commit d9bb8f2

Please sign in to comment.