diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..2bbb9f7 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,53 @@ +name: Deploy personal preview + +on: + push: + branches: ["development"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: personal-pages + cancel-in-progress: true + +jobs: + preview: + if: github.repository == 'Gandlfst/seed-emulator-www' && github.ref == 'refs/heads/development' + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Check out source + uses: actions/checkout@v4 + + - name: Set up Ruby and install dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler-cache: true + + - name: Build the personal preview + run: | + bundle exec jekyll build --config _config.yml,_config.preview.yml --trace + rm -f _site/CNAME + env: + JEKYLL_ENV: production + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + + - name: Upload the built site + uses: actions/upload-pages-artifact@v3 + with: + path: _site + + - name: Deploy the personal preview + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index a8ca04b..2f28953 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,6 @@ Each project data folder contains: Public images live under `assets/images//`; shared branding lives under `assets/images/shared/`. Keep `_data` for YAML content only. -Paper PDFs stay in `assets/papers/`. `_plugins/paper-url.rb` also publishes the -SIGCSE 2027 paper at `/papers/sigcse_2027.pdf` during the Jekyll build. - ## Page composition Layouts are split by page responsibility and are not nested. `home` renders the @@ -284,3 +281,11 @@ Before merging, a repository administrator must confirm: After merging, confirm that both build and deploy succeed in Actions, then check the production site. + +### Personal preview + +`Gandlfst/seed-emulator-www` publishes `development` to +https://gandlfst.github.io/seed-emulator-www/ using `.github/workflows/preview.yml`. +The preview build adds `_config.preview.yml` and omits `CNAME` from its output. +This workflow runs only in the personal repository; the production workflow and +domain configuration remain unchanged. Its Pages source must be **GitHub Actions**. diff --git a/_config.preview.yml b/_config.preview.yml new file mode 100644 index 0000000..07a0e67 --- /dev/null +++ b/_config.preview.yml @@ -0,0 +1,3 @@ +# Personal project-site settings; the production configuration stays unchanged. +url: "https://gandlfst.github.io" +baseurl: "/seed-emulator-www" diff --git a/_plugins/paper-url.rb b/_plugins/paper-url.rb deleted file mode 100644 index 89a731e..0000000 --- a/_plugins/paper-url.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Keep the PDF source in assets/papers while publishing its short URL. -Jekyll::Hooks.register :site, :post_write do |site| - source = site.in_source_dir("assets/papers/sigcse_2027.pdf") - target = site.in_dest_dir("papers/sigcse_2027.pdf") - FileUtils.mkdir_p(File.dirname(target)) - FileUtils.cp(source, target) -end diff --git a/pages/papers/index.html b/pages/papers/index.html index 8efc958..8faa6f9 100644 --- a/pages/papers/index.html +++ b/pages/papers/index.html @@ -13,7 +13,7 @@ title: 'Internet in a Box: Scaling Hands-On Education with the SEED Emulator' description: Wenliang Du, Chunling Yang, and Qishu Jin. ACM SIGCSE Technical Symposium, February 17–20, 2027, Sacramento, California, USA. - url: /papers/sigcse_2027.pdf + url: assets/papers/sigcse_2027.pdf - type: HotNets 2022 title: 'SEED Emulator: An Internet Emulator for Research and Education'