Last active
July 10, 2020 23:47
-
-
Save rchaganti/056a02f289d7d5415c17d27082ee753b to your computer and use it in GitHub Desktop.
BlogSnippets
This file contains hidden or 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
{{<armvisualize href="link-to-json-file">}} | |
{{<armvisualize "link-to-json-file">}} |
This file contains hidden or 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
{{<azcloudshell target="bash">}} | |
{{<azcloudshell target="powershell">}} | |
{{<azcloudshell>}} |
This file contains hidden or 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
{{ if .IsNamedParams }} | |
<a href="{{.Get "href"}}" target="_blank"> | |
<img src="http://azuredeploy.net/deploybutton.png" alt=""> | |
</a> | |
<br /> | |
{{ else }} | |
<a href="{{.Get 0}}" target="_blank"> | |
<img src="http://azuredeploy.net/deploybutton.png" alt=""> | |
</a> | |
<br /> | |
{{ end }} |
This file contains hidden or 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
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-storage-account-create%2Fazuredeploy.json" target="_blank"> | |
<img src="https://aka.ms/deploytoazurebutton"/> | |
</a> |
This file contains hidden or 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
{{<azdeploy href="link-to-json">}} | |
{{<azdeploy "link-to-json">}} |
This file contains hidden or 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
{{ if .IsNamedParams }} | |
<center> | |
<iframe | |
src="{{.Get "src"}}/player" | |
width="640" | |
height="360" | |
frameBorder="0" | |
allowfullscreen="true"> | |
</iframe> | |
</center> | |
<br /> | |
{{ else }} | |
<center> | |
<iframe | |
src="{{.Get 0}}/player" | |
width="640" | |
height="360" | |
frameBorder="0" | |
allowfullscreen="true"> | |
</iframe> | |
</center> | |
<br /> | |
{{ end }} |
This file contains hidden or 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
{{<channel9 src="https://channel9.msdn.com/Events/Build/2020/KEY01">}} | |
{{<channel9 "https://channel9.msdn.com/Events/Build/2020/KEY01">}} |
This file contains hidden or 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
gh pr create --title "#GitHub Workflow For Streamlined Publishing of Static Pages #Hugo" --body "https://ravichaganti.com/blog/github-workflow-for-streamlined-publishing-of-static-pages" |
This file contains hidden or 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
gh pr merge --merge 10 |
This file contains hidden or 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
{{< gist rchaganti 056a02f289d7d5415c17d27082ee753b "gistshortcode" >}} |
This file contains hidden or 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
<div class="views"> | |
<span class="views"> | |
<img src="https://visitor-badge.glitch.me/badge?page_id={{ .Permalink }}" alt="Views"/> | |
</span> | |
</div> |
This file contains hidden or 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
# Publishes a blog post when a pull request is merged. | |
name: Publish Blog Post | |
# Controls when the action will run. Triggers the workflow on closing a pull request | |
# events but only for the live branch | |
on: | |
pull_request: | |
branches: [ live ] | |
types: [closed] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: false | |
fetch-depth: 0 | |
# setup Hugo 0.73.0 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.73.0' | |
extended: true | |
# start the hugo static site generation. | |
- name: Build | |
run: hugo | |
# deploy the generated static pages to the external repo hosting the website | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.hugo_token }} | |
external_repository: rchaganti/rchaganti.github.io | |
user_name: 'Ravikanth C' | |
user_email: '[email protected]' | |
publish_branch: 'master' | |
cname: ravichaganti.com | |
# tweet the article | |
- name: Tweet | |
uses: ethomson/send-tweet-action@v1 | |
with: | |
status: "${{ github.event.pull_request.title }} ${{ github.event.pull_request.body }}" | |
consumer-key: ${{ secrets.TWITTER_API_KEY }} | |
consumer-secret: ${{ secrets.TWITTER_API_SECRET_KEY }} | |
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment