diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 73cb607..324e8ef 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,19 +1,36 @@ - - name: Vite Github Pages Deployer +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages - uses: skywarth/vite-github-pages-deployer@v1.3.0 - with: - # Public base path string for vite, this affects the routing, history and asset links. Make sure to provide appropriately since Github Pages stores your app in a directory under a subdomain. - public_base_path: # optional, default is - # Which folder do you want your Github Page to use as root directory. Usually it is your build output directory such as ./dist - build_path: # optional, default is ./dist - # Node env that will be used for the installation of dependencies. It is imperative you use an environment that has 'vite' as dependency. Commonly, that is 'dev'. - install_phase_node_env: # optional, default is dev - # Node env that will be used for build phase. - build_phase_node_env: # optional, default is production - # Your preference of package manager: 'npm' and 'yarn' are possible values. - package_manager: # optional, default is npm - # Desired name for the Deployment environment. It is also the exposed artifact name which contains the build output (dist). - artifact_name: # optional, default is github-pages - # Controls the debug mode, boolean, true is for on. When turned on, it'll output certain information on certain steps. Mainly used for development, but use it as you please to inspect your env and variables. - debug_mode: # optional, default is false - +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deploy_to_pages.outputs.github_pages_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Vite Github Pages Deployer + uses: skywarth/vite-github-pages-deployer@v1.2.0 + id: deploy_to_pages