finally site update #65
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: Upload to GitHub Pages | |
| on: | |
| push: | |
| branches: ["master"] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install SSG | |
| run: sudo apt-get install ruby jekyll ruby-jekyll-feed | |
| - name: Install exiftool | |
| run: sudo apt-get install exiftool ruby-mini-exiftool webp | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Checkout photos2 | |
| run: | | |
| gh api repos/s7uck/photos/git/trees/main?recursive=1 > tree.json | |
| mkdir photos | |
| cat tree.json | jq -r '.tree[] | select(.type=="blob") | .path' | while read file; do | |
| case "$file" in | |
| *.jpg|*.JPG|*.jpeg|*.png) | |
| mkdir -p "photos/$(dirname "$file")" | |
| touch "photos/$file" | |
| ;; | |
| esac | |
| done | |
| # - name: Checkout photos | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # repository: 's7uck/photos' | |
| # path: './photos' | |
| - name: Build site | |
| # Outputs to the './_site' directory by default | |
| run: jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | |
| env: | |
| JEKYLL_ENV: production | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |