Skip to content

add trailing slash

add trailing slash #38

Workflow file for this run

on:
push:
branches:
- main
- dev
workflow_dispatch:
jobs:
env-prod:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: production
url: https://pengu.lol
steps:
- run: echo >nul
env-dev:
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
environment:
name: development
url: https://beta.pengu.lol
steps:
- run: echo >nul
deploy:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set environment variables
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "DENO_DEPLOY_PROJECT=pengu-docs" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
echo "DENO_DEPLOY_PROJECT=pengu-docs-dev" >> $GITHUB_ENV
fi
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install Deno deployctl
run: deno install -gArf jsr:@deno/deployctl
- name: Build project
run: |
npm i -g pnpm
pnpm install
pnpm build
- name: Deploy to Deno Deploy
run: |
cd .vitepress
deployctl deploy --prod --project=$DENO_DEPLOY_PROJECT ./serve.ts --token ${{ secrets.DENO_DEPLOY_TOKEN }}