diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..528bce6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Deploy to GitHub Pages + +on: + workflow_dispatch: + inputs: + manualrun: + description: 'Manually run workflow' + required: true + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v4 + + - name: Install Dependencies + run: npm install + + - name: Build + run: | + npm run build + + - name: Deploy + run: | + git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + npx gh-pages -d build -t true -u "github-actions-bot " + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}