Skip to content

ci(github): use gitploy-action in build.yml #133

ci(github): use gitploy-action in build.yml

ci(github): use gitploy-action in build.yml #133

Workflow file for this run

name: build
on: [push, pull_request]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm install --prefer-offline
- name: Set environment variables
run: |
echo "URL=$(jq -r .homepage package.json)" >> $GITHUB_ENV
- name: Build
run: npm run build -- --public-url ${{ env.URL }}
- name: Deploy
if: github.ref_name == 'master'
uses: remarkablemark/gitploy-action@v1
with:
directory: dist