Skip to content

Commit

Permalink
ci: deploy index
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed May 14, 2024
1 parent 500ec24 commit b9a394c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/deploy-index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Deploy index
on:
push:
branches: [ "main" ]
paths:
- 'index.yaml'
workflow_dispatch:

# Default to bash
Expand All @@ -21,8 +23,11 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Fetch plugin manifests and generate a list of plugins
run: go run cmd/crawler/main.go site/data/index.yaml
- name: Copy plugin index
run: |
cp index.yaml site/data/
mkdir -p site/public/v1
cp index.yaml site/public/v1/
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
Expand All @@ -43,10 +48,6 @@ jobs:
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Store a yaml file for the plugin list
run: |
mkdir -p site/public/v1
cp site/data/index.yaml site/public/v1
- uses: actions/upload-pages-artifact@v3
with:
path: site/public
Expand Down

0 comments on commit b9a394c

Please sign in to comment.