Skip to content

Commit

Permalink
Create dispatch-publish.yml
Browse files Browse the repository at this point in the history
test.yml won't publish on its own (only after push or update.yml), so got screwed there reactivating the workflow after
this should act as a push for test,yml and add an option to force it in the future
  • Loading branch information
Celestia74 committed Oct 24, 2024
1 parent 6697ecb commit 5835821
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/dispatch-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow will do an install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Force Publish
# To test build from dispatch without publish, run Tests instead.

on:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: Zarel/setup-node@patch-1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
# - run: npm run test
env:
CI: true

publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v2
- run: npm install
- name: Build
run: node build
- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: 'dist'
- uses: actions/configure-pages@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 5835821

Please sign in to comment.