|
11 | 11 | echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/}|grep -v '/')"; |
12 | 12 | echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/}|grep -v '/')"; |
13 | 13 | id: extract |
14 | | - - name: Skip branches which use a name reserved for use on the server |
15 | | - if: >- |
16 | | - ${{ steps.extract.outputs.branch == '' |
17 | | - || steps.extract.outputs.branch == 'www' |
18 | | - || steps.extract.outputs.branch == 'download' |
19 | | - || steps.extract.outputs.branch == 'static' |
20 | | - || steps.extract.outputs.branch == 'ssl' |
21 | | - || steps.extract.outputs.branch == 'webalizer' |
22 | | - || steps.extract.outputs.branch == 'tmp' }} |
23 | | - run: > |
24 | | - echo "Not publishing '${{steps.extract.outputs.branch}}'"; |
25 | | - echo "##[set-output name=skip;]true" |
26 | | - id: check |
27 | | - - if: ${{ ! steps.check.outputs.skip }} |
28 | | - uses: actions/checkout@v2 |
29 | | - - if: ${{ ! steps.check.outputs.skip }} |
30 | | - run: ./.github/workflows/setup.sh |
31 | | - - if: ${{ ! steps.check.outputs.skip }} |
32 | | - run: make |
33 | 14 | - name: Write secret keys |
34 | | - id: secret_keys |
35 | | - if: ${{ ! steps.check.outputs.skip }} |
36 | 15 | run: > |
37 | 16 | echo "$FIREHOL_ORG_PUBLISH_SSH" > firehol_org_publish_key; |
38 | 17 | chmod 600 firehol_org_publish_key; |
|
47 | 26 | rm -f firehol_org_publish_key |
48 | 27 | env: |
49 | 28 | FIREHOL_ORG_PUBLISH_SSH: ${{secrets.FIREHOL_ORG_PUBLISH_SSH}} |
| 29 | + id: secret_keys |
| 30 | + - name: Skip branches which use a name reserved for use on the server |
| 31 | + if: >- |
| 32 | + ${{ steps.extract.outputs.branch == '' |
| 33 | + || steps.extract.outputs.branch == 'www' |
| 34 | + || steps.extract.outputs.branch == 'download' |
| 35 | + || steps.extract.outputs.branch == 'static' |
| 36 | + || steps.extract.outputs.branch == 'ssl' |
| 37 | + || steps.extract.outputs.branch == 'webalizer' |
| 38 | + || steps.extract.outputs.branch == 'tmp' }} |
| 39 | + run: > |
| 40 | + echo "Not publishing '${{steps.extract.outputs.branch}}'"; |
| 41 | + echo "##[set-output name=skip;]true" |
| 42 | + id: check |
| 43 | + - uses: actions/checkout@v2 |
| 44 | + - run: ./.github/workflows/setup.sh |
| 45 | + - run: make |
50 | 46 | - name: Deploy website ${{steps.extract.outputs.branch}} |
51 | | - if: ${{ steps.secret_keys.outputs.has_ssh_key }} |
| 47 | + if: ${{ steps.secret_keys.outputs.has_ssh_key && ! steps.check.outputs.skip }} |
52 | 48 | run: ./.github/workflows/deploy-website.sh ${{steps.extract.outputs.branch}} |
53 | 49 | env: |
54 | 50 | SSH_AGENT_PID: ${{ steps.secret_keys.outputs.ssh_agent_pid }} |
55 | 51 | SSH_AUTH_SOCK: ${{ steps.secret_keys.outputs.ssh_auth_sock }} |
| 52 | + - name: Check deployment |
| 53 | + if: ${{ steps.secret_keys.outputs.has_ssh_key && ! steps.check.outputs.skip }} |
| 54 | + run: > |
| 55 | + sleep 300; |
| 56 | + curl -q -o- https://firehol.org/travis-website.log |
0 commit comments