Fix deploy workflow (#18) #91
This file contains hidden or 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: build | |
| on: | |
| push: {} | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --locked | |
| - name: AppPack CLI | |
| uses: apppackio/setup-apppack-cli@v1 | |
| - name: CLI docs | |
| run: apppack docgen --directory src/command-line-reference | |
| - name: Build | |
| run: APPPACK_VERSION=$(apppack version) make build | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| path: public | |
| retention-days: 3 | |
| deploy: | |
| needs: [build] | |
| runs-on: ubuntu-24.04 | |
| if: github.ref == 'refs/heads/deploy/prod' | |
| environment: production | |
| env: | |
| AWS_DEFAULT_REGION: us-east-1 | |
| AWS_ROLE_ARN: "arn:aws:iam::101287669015:role/docs-github-actions" | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| name: artifact | |
| path: artifact | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v5 | |
| with: | |
| role-to-assume: ${{ env.AWS_ROLE_ARN }} | |
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
| - name: Deploy | |
| run: mv artifact public && make deploy |