Skip to content

Commit

Permalink
Publish to branch/version specific directory (#9)
Browse files Browse the repository at this point in the history
* Publish to branch/version specific directory

* Delete data directory

* Remove data/* headers

* Remove the data from deployment
  • Loading branch information
juntyr authored Nov 1, 2024
1 parent bd97052 commit f147783
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,18 @@ jobs:
rm -f static/pyodide/tsconfig.tsbuildinfo
jupyter lite build --output-dir dist
cp ./_headers dist/
cp -r data dist/
cp static/favicons/favicon.ico dist/
find dist/ -name favicon.ico | xargs -L1 cp -f static/favicons/favicon.ico
rm -rf static
- name: Get the current branch name
uses: tj-actions/branch-names@v8
id: branch
- name: Deploy to dist branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: dist
publish_dir: ./dist
destination_dir: ${{ steps.branch.outputs.current_branch }}
keep_files: false
force_orphan: true
6 changes: 0 additions & 6 deletions _headers
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/*
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin

/data/*
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Range
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
Access-Control-Expose-Headers: Accept-Ranges, Content-Encoding, Content-Range
Binary file removed data/hplp_ml_q_dx=2.0.grib
Binary file not shown.

0 comments on commit f147783

Please sign in to comment.