Skip to content

Commit

Permalink
ci: add collection of static assets with proper file permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
suliatis committed Nov 24, 2023
1 parent f6e4573 commit 0bab6a1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ jobs:
run: make test
- name: Release
run: make release
- name: Site & Permissions
run: make site
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "."
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ App.js
App.js.map

.vscode

_site
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ release: ## Package the application in release mode
--js-mode release\
--output App.js -f

site: ## Collect static assets for GitHub Pages
mkdir _site
cp -R styles _site/styles
cp App.js _site/App.js
cp index.html _site/index.html
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done

test: ## Run tests
scala-cli test .

Expand Down

0 comments on commit 0bab6a1

Please sign in to comment.