Update 44-echo-double-combat.md #43
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 Website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| # BEGIN Dependencies | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.9' | |
| architecture: 'x64' | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.0' | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: '14' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| vendor/bundle | |
| ~/.npm | |
| key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}-node- | |
| ${{ runner.os }}-gems- | |
| - name: Install dependencies | |
| run: | | |
| cd website | |
| gem install bundler | |
| bundle config path vendor/bundle | |
| bundle install --jobs 4 --retry 3 | |
| npm install | |
| bundle pristine ffi | |
| # END Dependencies | |
| - name: Build Site | |
| run: | | |
| cd website | |
| gem install bundler | |
| python -m pip install --upgrade pip | |
| export PATH=/home/runner/.local/bin:$PATH | |
| JEKYLL_ENV=production bundle exec jekyll build --strict_front_matter -d _site/ | |
| - name: Add CNAME to publish directory | |
| run: | | |
| # ensure the CNAME in repo root is copied into the generated site so GitHub Pages uses the custom domain | |
| if [ -f CNAME ]; then | |
| mkdir -p website/_site | |
| cp CNAME website/_site/CNAME | |
| fi | |
| - name: Deploy 🚀 | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./website/_site/ | |
| publish_branch: gh-pages | |
| cname: writeups.cyscomvit.com |