|
| 1 | +name: CD |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + version: |
| 6 | + required: true |
| 7 | +jobs: |
| 8 | + pods: |
| 9 | + runs-on: macos-latest |
| 10 | + steps: |
| 11 | + |
| 12 | + - name: Start Deployment |
| 13 | + uses: bobheadxi/deployments@v0.5.2 |
| 14 | + id: deployment |
| 15 | + with: |
| 16 | + step: start |
| 17 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 18 | + env: pods |
| 19 | + |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + with: |
| 22 | + submodules: true |
| 23 | + |
| 24 | + - run: pod trunk push --allow-warnings --skip-tests --skip-import-validation |
| 25 | + env: |
| 26 | + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} |
| 27 | + |
| 28 | + - name: Seal Deployment |
| 29 | + uses: bobheadxi/deployments@v0.5.2 |
| 30 | + if: always() |
| 31 | + with: |
| 32 | + step: finish |
| 33 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 34 | + status: ${{ job.status }} |
| 35 | + deployment_id: ${{ steps.deployment.outputs.deployment_id }} |
| 36 | + |
| 37 | + docs: |
| 38 | + runs-on: macos-latest |
| 39 | + steps: |
| 40 | + |
| 41 | + - name: Start Deployment |
| 42 | + uses: bobheadxi/deployments@v0.5.2 |
| 43 | + id: deployment |
| 44 | + with: |
| 45 | + step: start |
| 46 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + env: docs |
| 48 | + |
| 49 | + - uses: actions/checkout@v2 |
| 50 | + - run: gem install jazzy |
| 51 | + - run: | |
| 52 | + jazzy --config .github/jazzy.yml \ |
| 53 | + --github_url 'https://github.com/mxcl/PromiseKit' \ |
| 54 | + --module-version ${{ github.event.inputs.version }} |
| 55 | + - run: git remote update |
| 56 | + - run: git checkout gh-pages |
| 57 | + - run: rm -rf reference/v6 |
| 58 | + - run: mv output reference/v6 |
| 59 | + - run: git add reference/v6 |
| 60 | + - run: git config user.name github-actions |
| 61 | + - run: git config user.email github-actions@github.com |
| 62 | + - run: git commit -m 'Updated docs for v${{ github.event.inputs.version }}' |
| 63 | + - run: git remote add secure-origin https://${{ secrets.JAZZY_PAT }}@github.com/mxcl/PromiseKit.git |
| 64 | + - run: git push secure-origin gh-pages |
| 65 | + |
| 66 | + - name: Seal Deployment |
| 67 | + uses: bobheadxi/deployments@v0.5.2 |
| 68 | + if: always() |
| 69 | + with: |
| 70 | + step: finish |
| 71 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 72 | + status: ${{ job.status }} |
| 73 | + deployment_id: ${{ steps.deployment.outputs.deployment_id }} |
0 commit comments