diff --git a/.github/workflows/cf-pages.yml b/.github/workflows/cf-pages.yml new file mode 100644 index 0000000..e646df7 --- /dev/null +++ b/.github/workflows/cf-pages.yml @@ -0,0 +1,34 @@ +name: CF Pages + +on: + push: + branches: + - master + paths-ignore: + - "README.md" + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + + - run: npm install + - run: npm run build-site + + - name: Publish + uses: cloudflare/pages-action@1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: jsoncv + directory: src/dist + gitHubToken: ${{ secrets.GITHUB_TOKEN }}