chore(deps): update peaceiris/actions-gh-pages action to v4 (#12) #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: website | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Set Env | |
run: | | |
echo "OWNER_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')" >> $GITHUB_ENV | |
echo "REPO_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')" >> $GITHUB_ENV | |
echo "HOMEPAGE=$(echo "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY")" >> $GITHUB_ENV | |
- name: Install | |
run: npm install | |
- name: Build | |
run: npm run website -- --metadataName="${REPO_NAME}" --metadataNamespace="${HOMEPAGE}" --metadataHomepage="${HOMEPAGE}" | |
env: | |
OWNER_NAME: ${{ env.OWNER_NAME }} | |
REPO_NAME: ${{ env.REPO_NAME }} | |
HOMEPAGE: ${{ env.HOMEPAGE }} | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |