Updated publication. #12
Workflow file for this run
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 PR Preview to GitHub Pages | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| deploy-preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout PR branch | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| # Set up Ruby and install Bundler | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 2.7.8 | |
| # Install dependencies (Jekyll and Bundler) | |
| - name: Install dependencies | |
| run: | | |
| gem install bundler -v 2.4.22 | |
| bundle install | |
| # Build the Jekyll site with preview-specific baseurl | |
| - name: Build the site with Jekyll | |
| run: | | |
| echo "baseurl: '/mcsmip.github.io/preview/${{ github.event.pull_request.number }}'" >> _config.yml | |
| bundle exec jekyll build | |
| # Deploy to GitHub Pages Preview | |
| - name: Deploy to GitHub Pages Preview | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GH_TOKEN }} | |
| publish_dir: ./_site | |
| publish_branch: gh-pages | |
| destination_dir: preview/${{ github.event.pull_request.number }} |