Skip to content

Deploy Bikram Sambat Docs #11

Deploy Bikram Sambat Docs

Deploy Bikram Sambat Docs #11

Workflow file for this run

name: Deploy Bikram Sambat Docs
on:
push:
branches: ['main']
paths: ['docs/**']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- name: Setup Pages
uses: actions/configure-pages@v3
with:
static_site_generator: next
- name: Restore cache
uses: actions/cache@v3
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Install dependencies
run: yarn install
- name: Build Docs App
run: yarn build
# - name: Grant permissions
# run: |
# chmod -c -R +rX docs/out | while read line; do
# echo "::warning title=Invalid file permissions automatically fixed::$line"
# done
- name: Upload Docs App
uses: actions/upload-pages-artifact@v2
with:
path: ./docs/out
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy Docs App
id: deployment
uses: actions/deploy-pages@v2