Deploy #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
component: | |
description: Component | |
options: | |
- www | |
required: true | |
type: choice | |
version: | |
description: Version | |
required: true | |
type: string | |
permissions: | |
id-token: write | |
pages: write | |
jobs: | |
prepare-artifact: | |
name: Prepare Artifact | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download release artifact | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release download ${{ inputs.component }}-${{ inputs.version }} --dir artifacts --pattern '${{ inputs.component }}-${{ inputs.version }}.zip' | |
- name: Extract artifact | |
run: unzip ${{ inputs.component }}-${{ inputs.version }}.zip -d ${{ inputs.component }}-${{ inputs.version }} | |
working-directory: artifacts | |
- name: Upload workflow artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: artifacts/${{ inputs.component }}-${{ inputs.version }} | |
deploy: | |
name: Deploy | |
environment: | |
name: github-pages | |
url: ${{ steps.deploy.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: prepare-artifact | |
steps: | |
- name: Deploy | |
id: deploy | |
uses: actions/deploy-pages@v4 |