name: Deploy to GitHub Pages and create release on: workflow_dispatch: push: tags: - '*' jobs: deploy: name: Deploy to GitHub Pages runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Use Node.js uses: actions/setup-node@v1 with: node-version: 10.x - name: npm install and build run: | npm install npm run build - name: Create release uses: ncipollo/release-action@v1 with: artifacts: "dist" token: ${{ secrets.GITHUB_TOKEN }} - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@3.6.2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: build # The branch the action should deploy to. FOLDER: dist/ # The folder the action should deploy. CLEAN: false # Automatically remove deleted files from the deploy branch