Migrate to Next JS #38
Workflow file for this run
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: Build and deploy images | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "web/**" | |
- "api/**" | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- "web/**" | |
- "api/**" | |
jobs: | |
build_images: | |
name: Build images | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Compress platform images | |
uses: ClydeDz/compress-images@v1 | |
with: | |
input-directory: images/platforms | |
output-directory: images/public/platforms | |
- name: Compress portfolio images | |
uses: ClydeDz/compress-images@v1 | |
with: | |
input-directory: images/portfolio | |
output-directory: images/public/portfolio | |
- name: Compress site images | |
uses: ClydeDz/compress-images@v1 | |
with: | |
input-directory: images/site | |
output-directory: images/public/site | |
- name: Compress device-icons images | |
uses: ClydeDz/compress-images@v1 | |
with: | |
input-directory: images/device-icons | |
output-directory: images/public/device-icons | |
- name: Upload image files | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ./images/public | |
deploy_images: | |
name: Deploy images | |
runs-on: ubuntu-latest | |
needs: build_images | |
if: | | |
success() && | |
github.ref == 'refs/heads/main' | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: artifact | |
- name: Deploy artifacts to the images repo | |
uses: tagus/[email protected] | |
with: | |
changes: artifact | |
repository: [email protected]:clydedsouza/clydedsouza-web-files.git | |
ssh_key: ${{ secrets.IMAGES_REPO_DEPLOY_KEY }} | |
name: clydedsouza | |
email: [email protected] | |
clean_repo: true | |
branch: main | |
message: "Commit from the monorepo images deploy job" |