-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update-tailwind: remove tailwind folder and update deployment
- Loading branch information
Showing
15 changed files
with
1,553 additions
and
1,989 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
tailwind/build.css linguist-generated | ||
build.css linguist-generated |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,41 +6,63 @@ on: | |
branches: | ||
- master | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Set the job key. The key is displayed as the job name | ||
# when a job name is not provided | ||
gh-pages: | ||
# Name the Job | ||
name: Deploy to Github pages | ||
# Set the type of machine to run on | ||
# build job | ||
build: | ||
name: Build tailwind | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu-latest machine | ||
- name: Checkout code 🛎️ | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Install tailwind | ||
run: cd tailwind && npm install tailwindcss@3.0.24 --no-save | ||
run: npm install tailwindcss@experimental --no-save | ||
|
||
- name: Build 🔧 | ||
run: | | ||
cd tailwind | ||
cat tailwind.css custom.css > tailwind.temp.css | ||
npx tailwindcss build tailwind.temp.css -c tailwind.config.prod.js -o build.css | ||
npx tailwindcss -i tailwind.temp.css -o build.css -m | ||
- name: Remove dev css links | ||
run: | | ||
sed -i 's|<link href="tailwind/custom.css" rel="stylesheet">||g' *.html | ||
sed -i "s|tailwind/build.css|tailwind/build.css?v=$(git log --format="%h" -n 1)|g" *.html | ||
sed -i 's|<link href="custom.css" rel="stylesheet">||g' *.html | ||
sed -i "s|build.css|build.css?v=$(git log --format="%h" -n 1)|g" *.html | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-[email protected] | ||
- name: Upload artifact 🚀 | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
BRANCH: gh-pages | ||
FOLDER: . # The folder the action should deploy. | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SINGLE_COMMIT: true | ||
PRESERVE: true | ||
# Upload entire repository | ||
path: '.' | ||
|
||
|
||
# Deployment job | ||
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@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Generate developer Tailwindcss build: | ||
|
||
`bunx tailwindcss@experimental -i tailwind.css -o build.css` | ||
|
||
This will produce all classes used by Tailwindcss. | ||
|
||
|
||
## Generate production Tailwindcss build: | ||
|
||
cat tailwind.css custom.css > tailwind.temp.css | ||
bunx tailwindcss@experimental -i tailwind.temp.css -o build.css -m | ||
|
||
This will produce classes only used in code (files are specified in `./tailwind.config.js`) and minify the resulting css. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ Kockatý Kalendár je spoločná iniciatíva týchto organizácií, ktorá ponú | |
## Kontakt | ||
|
||
Ak si našiel/-la chybu alebo máš otázku, napíš nám na [email protected] a my sa ti ozveme. | ||
|
||
|
Oops, something went wrong.