Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

fix Github Action

fix Github Action #5

Workflow file for this run

name: Deploy site to Static files
on:
push:
# branches: ["main"]
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
# Build
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Restore cache
uses: actions/cache@v3
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: yarn
- name: Build with Next.js
run: yarn build
- name: Zip the build
run: zip -r hjweb2-release.zip ./
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
body: New release for hjweb 2.0. is comming!
draft: false
prerelease: false
files: |
hjweb2-release.zip