Skip to content

Commit

Permalink
feat(gha): add prettier workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellabrookes committed Jul 8, 2024
1 parent 0cf0285 commit 5e49940
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pull-request

on:
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Prettify code
run: npx prettier --write .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
commit_message: 'gha(prettier): format files'
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# TWC The Netherlands

[![Netlify Status](https://api.netlify.com/api/v1/badges/05f9fda5-6fd8-418d-9cee-67882c0f5dba/deploy-status)](https://app.netlify.com/sites/twc-site-nl/deploys)
[![website](https://img.shields.io/badge/website-url-blue.svg)](https://techwerkers.nl/)
[![production](https://img.shields.io/badge/production-url-blue.svg)](https://app.netlify.com/sites/twc-site-nl/deploys)
[![Twitter: nederlandtwc](https://img.shields.io/twitter/follow/nederlandtwc.svg?style=social)](https://twitter.com/nederlandtwc)
[![Netlify Status][netlify_bagde]][netlify_url]
[![website][website_badge]][website_url]
[![production][production_badge]][production_url]
[![Code style][code_style_badge]][code_style_url]
[![Twitter: nederlandtwc][twitter_badge]][twitter_url]

[![i18n-en](https://img.shields.io/badge/i18n-en-orange.svg)](./_i18n/en.yml)
[![i18n-nl](https://img.shields.io/badge/i18n-nl-orange.svg)](./_i18n/nl.yml)
[![i18n-en][i18n_en_url]][i18n_en_badge]
[![i18n-nl][i18n_nl_ur]][i18n_nl_badge]

> This repository is responsible for most content visible on the website [techwerkers.nl](https://techwerkers.nl). The site is made with a static site generator called [Jekyll](https://jekyllrb.com/) in a language called Ruby.
Expand All @@ -17,3 +18,22 @@ Read the [installation guide](./docs/contributing.md) to get set up.
## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/techworkersco/twc-site-nl/issues). You can also take a look at the [contributing guide](./docs/contributing.md).

<!-- Links -->
[code_style_badge]: https://img.shields.io/badge/code%20style-prettier-F7B93E?logo=Prettier
[code_style_url]: /.prettierrc
[netlify_bagde]: https://api.netlify.com/api/v1/badges/05f9fda5-6fd8-418d-9cee-67882c0f5dba/deploy-status
[netlify_url]: https://app.netlify.com/sites/twc-site-nl/deploys
[website_badge]: https://img.shields.io/badge/website-url-blue.svg
[website_url]: https://techwerkers.nl/
[production_badge]: https://img.shields.io/badge/production-url-blue.svg
[production_url]: https://app.netlify.com/sites/twc-site-nl/deploys
[twitter_badge]: https://img.shields.io/twitter/follow/nederlandtwc.svg?style=social
[twitter_url]: https://twitter.com/nederlandtwc

<!-- i18n Links -->

[i18n_en_badge]: https://img.shields.io/badge/i18n-en-orange.svg
[i18n_en_url]: ./_i18n/en.yml
[i18n_nl_badge]: https://img.shields.io/badge/i18n-nl-orange.svg
[i18n_nl_url]: ./_i18n/nl.yml

0 comments on commit 5e49940

Please sign in to comment.