diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f38ea6a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +name: Deploy PressKit.io to GitHub Pages + +on: + push: + branches: + - master + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js environment + uses: actions/setup-node@v3 + with: + node-version: "20" + + - name: Install dependencies + run: npm install presskit + + - name: Build PressKit.io site + run: rmdir -r build; presskit build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build