|
1 | | -# dev-box |
2 | | -📚 Pinnable dynamic Gist with your latest Dev.to activity. |
| 1 | +<p align="center"> |
| 2 | + <h3 align="center">Dev-Box</h3> |
| 3 | + <p align="center">Pinnable dynamic Gist with your latest Dev.to post!</p> |
| 4 | +</p> |
| 5 | + |
| 6 | +*** |
| 7 | +[](https://www.gnu.org/licenses/gpl-3.0) |
| 8 | + |
| 9 | +**Dev-Box** is a simple **GitHub Action** built to make dynamic Gist displaying your latest post from Dev.to |
| 10 | + |
| 11 | +<br> |
| 12 | + |
| 13 | +## 🎉 Usage |
| 14 | +**To start, you need to prepare some things:** |
| 15 | +- Create a new public GitHub Gist at https://gist.github.com/ |
| 16 | + |
| 17 | +- Create an Access Token with the `gist` scope and save it. |
| 18 | +You can do that at https://github.com/settings/tokens/new |
| 19 | + |
| 20 | +<br> |
| 21 | + |
| 22 | +**After getting this done:** |
| 23 | +- Fork this repository. |
| 24 | + |
| 25 | +- Go to your fork's **Settings > Secrets** page add the following secrets: |
| 26 | + - **`DEVTO_USERNAME`** - Your username from Dev.to |
| 27 | + - **`GH_TOKEN`** - The access token you saved earlier. |
| 28 | + - **`GIST_ID`** - The ID of your newly created public Gist. |
| 29 | + |
| 30 | + *It will look like this:* |
| 31 | + `https://gist.github.com/RangerDigital/`**`d1b79f73d3e5a2420ed370b0059dba42`**. |
| 32 | + |
| 33 | + - Delete a `.github/workflows/schedule.yml` file. |
| 34 | + |
| 35 | + - Create a `.github/workflows/dev-box.yml` file like this: |
| 36 | + |
| 37 | + ```yml |
| 38 | + name: Update GitHub Gist with Dev-box! |
| 39 | + |
| 40 | + on: |
| 41 | + schedule: |
| 42 | + - cron: '*/10 * * * *' |
| 43 | + |
| 44 | + jobs: |
| 45 | + build: |
| 46 | + runs-on: ubuntu-latest |
| 47 | + |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@master |
| 50 | + |
| 51 | + - name: Update latest post from Dev.to |
| 52 | + uses: rangerdigital/dev-box@master |
| 53 | + with: |
| 54 | + GH_TOKEN: ${{ secrets.GH_TOKEN }} |
| 55 | + GIST_ID: ${{ secrets.GIST_ID }} |
| 56 | + DEVTO_USERNAME: ${{ secrets.DEVTO_USERNAME }} |
| 57 | + ``` |
| 58 | +
|
| 59 | +<br> |
| 60 | +
|
| 61 | +**That's It!** |
| 62 | +Now every 10 minutes `dev-box.yml` workflow will update your Gist. |
| 63 | + |
| 64 | +<br> |
| 65 | + |
| 66 | +## 🚧 Contributing |
| 67 | + |
| 68 | +**You are more than welcome to help me improve Dev-Box!** |
| 69 | + |
| 70 | +Just fork this project from the `master` branch and submit a Pull Request (PR). |
| 71 | + |
| 72 | +<br> |
| 73 | + |
| 74 | +## 📃 License |
| 75 | +This project is licensed under [GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/) . |
0 commit comments