From e57c991de791a0677177cd2e68ab02a05414aa9f Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Fri, 5 May 2023 10:56:43 -0400 Subject: [PATCH 1/3] master push workflow can include a docs snapshot --- .github/workflows/snapshot-on-push-master.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index 50f5cd296..5b37e3645 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -118,9 +118,16 @@ jobs: if git commit -m "Updated from https://github.com/cc65/cc65/commit/${GITHUB_SHA}" ; then git push fi + - name: Package offline documents. + run: 7z a cc65-snapshot-docs.zip ./html/*.* + - name: Upload a Documents Snapshot Zip + uses: actions/upload-artifact@v3 + with: + name: cc65-snapshot-docs.zip + path: cc65-snapshot-docs.zip # enter secrets under "repository secrets" - - name: Upload snapshot to sourceforge + - name: Upload 32-bit Windows snapshot to sourceforge uses: nogsantos/scp-deploy@master with: src: cc65-snapshot-win32.zip @@ -129,5 +136,14 @@ jobs: port: ${{ secrets.SSH_PORT }} user: ${{ secrets.SSH_USER }} key: ${{ secrets.SSH_KEY }} + - name: Upload documents snapshot to sourceforge + uses: nogsantos/scp-deploy@master + with: + src: cc65-snapshot-docs.zip + host: ${{ secrets.SSH_HOST }} + remote: ${{ secrets.SSH_DIR }} + port: ${{ secrets.SSH_PORT }} + user: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} # TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io From 0cad5bef8169b634f288874e324f838a5da89884 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Fri, 5 May 2023 10:58:18 -0400 Subject: [PATCH 2/3] include docs snapshot with pull request build so that PRs can preview it easily --- .github/workflows/build-on-pull-request.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 05d6a4a39..55be5db1e 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -43,6 +43,11 @@ jobs: - name: Build the document files. shell: bash run: make -j2 doc + - name: Upload a documents snapshot. + uses: actions/upload-artifact@v3 + with: + name: docs + path: ./html - name: Build 64-bit Windows versions of the tools. run: | make -C src clean From 8f356f5093e7c9bbae33fe5103e3812f73eb8c30 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Fri, 5 May 2023 11:00:06 -0400 Subject: [PATCH 3/3] artifact upload should not end with .zip as it is appended automatically fixes ".zip.zip" artifact filenames --- .github/workflows/snapshot-on-push-master.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index 5b37e3645..408bdbb63 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -88,12 +88,12 @@ jobs: - name: Upload a 32-bit Snapshot Zip uses: actions/upload-artifact@v3 with: - name: cc65-snapshot-win32.zip + name: cc65-snapshot-win32 path: cc65-snapshot-win32.zip - name: Upload a 64-bit Snapshot Zip uses: actions/upload-artifact@v3 with: - name: cc65-snapshot-win64.zip + name: cc65-snapshot-win64 path: cc65-snapshot-win64.zip - name: Get the online documents repo. @@ -123,7 +123,7 @@ jobs: - name: Upload a Documents Snapshot Zip uses: actions/upload-artifact@v3 with: - name: cc65-snapshot-docs.zip + name: cc65-snapshot-docs path: cc65-snapshot-docs.zip # enter secrets under "repository secrets"