update tutorial for 2023 #47
This file contains 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 | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: "website_deployment" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
JBAKE_VERSION: "2.6.7" | |
JBAKE_SHA1: "fd07b833104f2889fde9a07d0c0bf09f0fdecbf6" | |
ACTIONS_CACHE_VERSION: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: JBake Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
downloads/*.zip | |
key: ${{ env.ACTIONS_CACHE_VERSION }}-${{ runner.os }}-${{ env.JBAKE_VERSION }} | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Install jbake | |
run: | | |
mkdir -p downloads | |
cd downloads | |
if [[ ! -f "jbake-${JBAKE_VERSION}-bin.zip" ]]; then | |
wget "https://github.com/jbake-org/jbake/releases/download/v${JBAKE_VERSION}/jbake-${JBAKE_VERSION}-bin.zip" | |
fi | |
echo "${JBAKE_SHA1} jbake-${JBAKE_VERSION}-bin.zip" > "jbake-${JBAKE_VERSION}-bin.zip.sha" | |
sha1sum -c "jbake-${JBAKE_VERSION}-bin.zip.sha" | |
unzip "jbake-${JBAKE_VERSION}-bin.zip" | |
mv "jbake-${JBAKE_VERSION}-bin" jbake | |
echo "$PWD/jbake/bin" >> $GITHUB_PATH | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-2 | |
- run: ./script/deploy.sh | |
env: | |
AWS_BUCKET: typedclojure.org |