Back to articles
πŸš€ Auto-Compile FSCSS to CSS with GitHub Actions + GitHub Pages
How-ToTools

πŸš€ Auto-Compile FSCSS to CSS with GitHub Actions + GitHub Pages

via Dev.toFSCSS tutorial

When working with FSCSS, it’s useful to have your styles compiled automatically whenever you push changes. In this guide, we’ll set up a workflow that: β€’ Compiles .fscss β†’ .css automatically β€’ Commits the compiled CSS β€’ Deploys a demo page with GitHub Pages The result is a simple CI/CD pipeline for your styles. You can see the complete example repository here: πŸ‘‰ https://github.com/fscss-ttr/clipfscss Live demo: πŸ‘‰ https://fscss-ttr.github.io/clipfscss/demo Project Structure Here’s the structure used in the example project. repo/ β”‚ β”œβ”€β”€ .github/workflows β”‚ β”œβ”€β”€ compile.yml β”‚ └── pages.yml β”‚ β”œβ”€β”€ src/ β”‚ └── style.fscss β”‚ β”œβ”€β”€ dist/ β”‚ └── f.css β”‚ β”œβ”€β”€ demo/ β”‚ └── index.html β”‚ β”œβ”€β”€ package.json └── package-lock.json Explanation "src/" β†’ FSCSS source files "dist/" β†’ compiled CSS output "demo/" β†’ static example page ".github/workflows/" β†’ automation scripts Install FSCSS Install via npm. npm install -g fscss Your package.json should look like this: { "dependencies" : { "fscss" : "^1.1.17" }, "scrip

Continue reading on Dev.to

Opens in a new tab

Read Full Article
3 views

Related Articles