All Projects β†’ gha-utilities β†’ sass-build

gha-utilities / sass-build

Licence: AGPL-3.0 License
GitHub Action JavaScript wrapper runs Sass build with provided Inputs

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to sass-build

episode-parser
A javascript utility for parsing file names in a format that sometimes is used for tv shows.
Stars: ✭ 24 (+50%)
Mutual labels:  javascript-utility
bump-everywhere
πŸš€ Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.
Stars: ✭ 24 (+50%)
Mutual labels:  github-action
webpack-4-react-bootstrap-starter-template
Starter boilerplate template for webpack 4 with React, Bootstrap 4
Stars: ✭ 16 (+0%)
Mutual labels:  sass-loader
nightfall dlp action
GitHub Data Loss Prevention (DLP) Action: Scan Pull Requests for sensitive data, like credentials & secrets, PII, credit card numbers, and more.
Stars: ✭ 46 (+187.5%)
Mutual labels:  github-action
setup-julia
This action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.
Stars: ✭ 56 (+250%)
Mutual labels:  github-action
pr-reviews-reminder-action
A GitHub Action to send Slack/Teams notification for Pull Request that are waiting for reviewers.
Stars: ✭ 18 (+12.5%)
Mutual labels:  github-action
nrwl-nx-action
A GitHub Action to wrap Nrwl Nx commands in your workflows.
Stars: ✭ 163 (+918.75%)
Mutual labels:  github-action
aliyun-oss-website-action
ε°†η½‘η«™ιƒ¨η½²εˆ°ι˜Ώι‡ŒδΊ‘OSS. Deploy website on aliyun OSS(Alibaba Cloud OSS)
Stars: ✭ 42 (+162.5%)
Mutual labels:  github-action
watermelon-http-client
GitHub Action to perform HTTP requests. Supports GraphQL!
Stars: ✭ 21 (+31.25%)
Mutual labels:  github-action
react-typescript-webpack-starter
A starter project for using React, TypeScript, SCSS using Webpack 5.
Stars: ✭ 55 (+243.75%)
Mutual labels:  sass-loader
github-action-markdown-cli
Style checking and linting for Markdown/CommonMark files.
Stars: ✭ 26 (+62.5%)
Mutual labels:  github-action
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+775%)
Mutual labels:  github-action
github-profile-3d-contrib
This GitHub Action creates a GitHub contribution calendar on a 3D profile image.
Stars: ✭ 230 (+1337.5%)
Mutual labels:  github-action
action-ssh
GitHub Action for executing SSH commands on remote servers
Stars: ✭ 60 (+275%)
Mutual labels:  github-action
action-snapcraft
🐦 GitHub Action for setting up Snapcraft
Stars: ✭ 34 (+112.5%)
Mutual labels:  github-action
github-action-benchmark
GitHub Action for continuous benchmarking to keep performance
Stars: ✭ 592 (+3600%)
Mutual labels:  github-action
ssh2actions
Connect to GitHub Actions VM via SSH for interactive debugging
Stars: ✭ 62 (+287.5%)
Mutual labels:  github-action
misspell-fixer-action
πŸ“Automatically fixes typos and mistakes in your source code and docs!
Stars: ✭ 123 (+668.75%)
Mutual labels:  github-action
laravel-phpinsights-action
Run PHP Insights in Laravel in Github Actions
Stars: ✭ 17 (+6.25%)
Mutual labels:  github-action
github-env-vars-action
πŸš€ GitHub Action for Environment Variables
Stars: ✭ 129 (+706.25%)
Mutual labels:  github-action

GHA Sass Build

GitHub Action JavaScript wrapper runs Sass build with provided Inputs

Byte size of gha-sass Open Issues Open Pull Requests Latest commits


Table of Contents


Requirements

Access to GitHub Actions if using on GitHub, or manually assigning environment variables prior to running npm test.


Quick Start

Reference the code of this repository within your own workflow...

on:
  push:
    branches:
      - src-pages


jobs:
  build_css:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout source Git branch
        uses: actions/checkout@v2
        with:
            ref: src-pages
            fetch-depth: 10
            submodules: true

      - name: Make destination directory for compiled CSS
        run: mkdir -vp /tmp/repo-name/assets/css

      - name: Compile CSS from SCSS files
        uses: gha-utilities/[email protected]
        with:
          source: _scss/main.scss
          destination: /tmp/repo-name/assets/css/main.css

      - name: Checkout destination Git branch
        uses: actions/checkout@v2
        with:
            ref: pr-pages
            fetch-depth: 1

      - name: Move compiled CSS to path within pr-pages branch
        run: mv /tmp/repo-name/assets/css assets/

      - name: Add and Commit changes to pr-pages branch
        run: |
          git config --local user.email '[email protected]'
          git config --local user.name 'GitHub Action'
          git add assets/css/*
          git commit -m 'Updates compiled CSS files'

      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: pr-pages

      - name: Initialize Pull Request
        uses: gha-utilities/[email protected]
        with:
          pull_request_token: ${{ secrets.GITHUB_TOKEN }}
          head: pr-pages
          base: gh-pages
          title: 'Updates site files from latest Actions build'
          body: >
            Perhaps a multi-line description
            about latest features and such.

Notes

To compile multiple files, define source and destination similarly to how you would assign run multiple commands. Make sure each file in source and destination are lined up.

    - name: Compile main.css from main.scss
      uses: gha-utilities/[email protected]
      with:
        source: |
          _scss/main.scss
          _scss/global.scss
          _scss/articles/post.scss
        destination: |
          /tmp/repo-name/assets/css/main.css
          /tmp/repo-name/assets/css/global.css
          /tmp/repo-name/assets/css/articles/post.css

To pass compiled CSS to another workflow utilize the Upload and Download Actions from GitHub...

.github/workflows/build_css.yml

on:
  push:
    branches:
      - src-pages


jobs:
  build_css:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout source Git branch
        uses: actions/checkout@v2
        with:
            ref: src-pages
            fetch-depth: 10
            submodules: true

      - name: Make destination directory for compiled CSS
        run: mkdir -vp /tmp/assets/css

      - name: Compile CSS from SCSS files
        uses: gha-utilities/[email protected]
        with:
          source: _scss/main.scss
          destination: /tmp/assets/css/main.css

      - name: Upload Complied CSS
        uses: actions/[email protected]
        with:
          name: Compiled-CSS
          path: /tmp/assets/css

.github/workflows/open_pull_request.yml

on:
  push:
    branches:
      - src-pages


jobs:
  open_pull_request:
    needs: [build_css]
    runs-on: ubuntu-latest

    steps:
      - name: Checkout destination Git branch
        uses: actions/checkout@v2
        with:
            ref: gh-pages
            fetch-depth: 1
            submodules: true

      - name: Download Compiled CSS
        uses: actions/[email protected]
        with:
          name: Compiled-CSS
          path: assets/css

      - name: Add and Commit changes to pr-pages branch
        run: |
          git config --local user.email '[email protected]'
          git config --local user.name 'GitHub Action'
          git add assets/css/*
          git commit -m 'Updates compiled CSS files'

      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: pr-pages

      - name: Initialize Pull Request
        uses: gha-utilities/[email protected]
        with:
          pull_request_token: ${{ secrets.GITHUB_TOKEN }}
          head: pr-pages
          base: gh-pages
          title: 'Updates site files from latest Actions build'
          body: >
            Perhaps a multi-line description
            about latest features and such.

This repository is influenced by tests preformed by sass-utilities/gha-sass which uses Docker powered GitHub Actions to achieve similar results. What differs are that this repository will start faster and enables configuring the build process further, see the action.yml for currently available configurations.


Attribution

Individuals

Resources


License

Legal bits of Open Source software. Note the following license does not necessarily apply to any dependencies of this repository, see licensing and documentation for those within there respective sub-directories under node_modules/.

Sass Build GitHub Actions documentation
Copyright (C) 2019  S0AndS0

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].