Improved download logic for non-openICPSR deposits #587
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: Deploy template repo | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - development | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, '[skipci]')" | |
| steps: | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +'%Y-%m-%d:%H:%M')" >> $GITHUB_OUTPUT | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | |
| - name: create external report | |
| run: | | |
| chmod a+rx build/build*sh | |
| build/build-ext-report.sh | |
| - name: Run docker for Docx | |
| uses: docker://pandoc/latex:2.9 | |
| with: | |
| args: "EXTERNAL-REPORT.md --standalone -t docx -o EXTERNAL-REPORT.docx" | |
| - name: create checksums | |
| run: | | |
| sha256sum REPLICATION.md > generated/REPLICATION.sha256 | |
| - name: Preserve reference copy | |
| run: | | |
| cp REPLICATION.md template/original-REPLICATION.md | |
| # Prepare deployment directory with selective content | |
| - name: Prepare deployment staging directory | |
| run: | | |
| set -e | |
| mkdir -p /tmp/deploy-staging | |
| # Copy everything except what we want to exclude | |
| rsync -av --exclude='.git' \ | |
| --exclude='build' \ | |
| --exclude='.claude' \ | |
| --exclude='.serena' \ | |
| --exclude='.venv-docs' \ | |
| --exclude='_build' \ | |
| --exclude='.github/workflows/deploy.yml' \ | |
| --exclude='.github/workflows/claude.yml' \ | |
| ./ /tmp/deploy-staging/ | |
| # Verify the docs workflow was copied | |
| echo "Contents of staging .github/workflows:" | |
| ls -la /tmp/deploy-staging/.github/workflows/ | |
| # send it to gh-pages | |
| # We use a personal token to allow for posting despite branch controls - see https://github.com/peaceiris/actions-gh-pages for parameters | |
| # Set exclude_assets to empty string to include .github directory | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3.8.0 | |
| with: | |
| deploy_key: ${{ secrets.PUSH_DEPLOY_KEY }} | |
| user_name: 'Github Action Bot' | |
| user_email: 'lars.vilhuber@cornell.edu' | |
| external_repository: aeadataeditor/replication-template | |
| publish_branch: master | |
| publish_dir: /tmp/deploy-staging | |
| keep_files: false | |
| force_orphan: true | |
| exclude_assets: '' | |
| commit_message: Release date ${{ steps.date.outputs.date }} |