From 927d9f4f7c11c42e1d34448d1c8dbf1a27d62467 Mon Sep 17 00:00:00 2001 From: Yukuro Date: Sat, 3 Feb 2024 18:08:21 +0900 Subject: [PATCH] add workflow --- .github/workflows/only-build.yaml | 36 +++++++++++++++++++++++++++++++ .github/workflows/preview.yaml | 2 +- .github/workflows/production.yaml | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/only-build.yaml diff --git a/.github/workflows/only-build.yaml b/.github/workflows/only-build.yaml new file mode 100644 index 0000000..240982a --- /dev/null +++ b/.github/workflows/only-build.yaml @@ -0,0 +1,36 @@ +name: only-build +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + schedule: + - cron: '0 3 * * *' + +jobs: + build-hugo: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + extended: true + + - name: Setup Go + uses: actions/setup-go@v4.0.0 + with: + go-version: '^1.21' + + - name: SetUp Env + run: hugo new site testenv + + - name: Set theme + uses: actions/checkout@v3 + with: + path: ./testenv/themes/hugo-theme-shell + + - name: Build + run: hugo --minify -t hugo-theme-shell + working-directory: ./testenv diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index c6be869..fd900ae 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -1,4 +1,4 @@ -name: GitHub Pages +name: preview env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index a48409b..67efd41 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -1,4 +1,4 @@ -name: GitHub Pages +name: production env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}