From c0999d996ec0c8410c1b18895a6dc3624cc10642 Mon Sep 17 00:00:00 2001 From: Ariel Rokem Date: Wed, 12 Jun 2024 13:54:28 -0700 Subject: [PATCH 1/2] Adds a manual deployment step. --- .github/workflows/build.yml | 20 -------------------- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45d9cd3..bd5fbc2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,23 +36,3 @@ jobs: with: name: poster path: poster.pdf - - deploy: - needs: build - runs-on: ubuntu-latest - if: github.event.pull_request.merged == true - steps: - - name: Commit poster PDF - if: github.event.pull_request.merged - uses: EndBug/add-and-commit@v9 - with: - add: 'poster.pdf' - author_name: 'GitHub Actions' - message: 'Add poster.pdf at ${{ github.sha }}' - - - name: Deploy html to gh-pages - if: github.event.pull_request.merged - uses: JamesIves/github-pages-deploy-action@4.1.5 - with: - branch: gh-pages - folder: ${{github.workspace}}/website \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5fbcbe1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy + +# configure manual trigger +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Commit poster PDF + uses: EndBug/add-and-commit@v9 + with: + add: 'poster.pdf' + author_name: 'GitHub Actions' + message: 'Add poster.pdf at ${{ github.sha }}' + + - name: Deploy html to gh-pages + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: ${{github.workspace}}/website \ No newline at end of file From 5dd4ed489f5413498b53424a7e61ffd1dbbf1508 Mon Sep 17 00:00:00 2001 From: Ariel Rokem Date: Wed, 12 Jun 2024 14:00:46 -0700 Subject: [PATCH 2/2] Need to add other steps before deployment. --- .github/workflows/deploy.yml | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5fbcbe1..a7101bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,15 +8,29 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - name: Commit poster PDF - uses: EndBug/add-and-commit@v9 - with: - add: 'poster.pdf' - author_name: 'GitHub Actions' - message: 'Add poster.pdf at ${{ github.sha }}' + - uses: actions/checkout@v4 + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libssl-dev - - name: Deploy html to gh-pages - uses: JamesIves/github-pages-deploy-action@4.1.5 - with: - branch: gh-pages - folder: ${{github.workspace}}/website \ No newline at end of file + - uses: r-lib/actions/setup-r@v2 + - uses : r-lib/actions/setup-pandoc@v1 + with: + r-version: '4.1.0' + pandoc-version: '2.14' + + - name: Build the poster + run: make install && make all && mkdir website && mv poster.html website/index.html && touch website/.nojekyll + + - name: Commit poster PDF + uses: EndBug/add-and-commit@v9 + with: + add: 'poster.pdf' + author_name: 'GitHub Actions' + message: 'Add poster.pdf at ${{ github.sha }}' + + - name: Deploy html to gh-pages + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: ${{github.workspace}}/website \ No newline at end of file